import request from "@/plugin/axios";

const BASE_URL = "auth";

export function UserLogin(data) {
  return request({
    url: BASE_URL + "/login",
    method: "post",
    data,
  });
}

export function UserLogout() {
  return request({
    url: BASE_URL + "/logout",
    method: "delete",
  });
}

export function UserCaptcha(data) {
  return request({
    url: BASE_URL + "/captcha",
    method: "get",
    params: data,
  });
}

export function GetCaptcha(data) {
  return request({
    url: BASE_URL + "/captcha",
    method: "get",
    params: data,
    responseType: "blob",
  });
}

// 系统自身的token登陆
export function sysTokenLogin(data) {
  return request({
    url: BASE_URL + "/tokenLogin",
    method: "get",
    params: data,
  });
}
